namespace WebCalendar.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class m6 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.CategoryFilters", "Category_ID", "dbo.Categories");
            DropForeignKey("dbo.CategoryFilters", "Calendar_ID", "dbo.Calendars");
            DropIndex("dbo.CategoryFilters", new[] { "Category_ID" });
            DropIndex("dbo.CategoryFilters", new[] { "Calendar_ID" });
            DropTable("dbo.CategoryFilters");
        }
        
        public override void Down()
        {
            CreateTable(
                "dbo.CategoryFilters",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        Visible = c.Boolean(nullable: false),
                        Category_ID = c.Int(),
                        Calendar_ID = c.Int(),
                    })
                .PrimaryKey(t => t.ID);
            
            CreateIndex("dbo.CategoryFilters", "Calendar_ID");
            CreateIndex("dbo.CategoryFilters", "Category_ID");
            AddForeignKey("dbo.CategoryFilters", "Calendar_ID", "dbo.Calendars", "ID");
            AddForeignKey("dbo.CategoryFilters", "Category_ID", "dbo.Categories", "ID");
        }
    }
}
